<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Str;
use Laravel\Sanctum\HasApiTokens;

class NewsDesc extends Base
{

    // 文章详情
    protected $table = 'news_desc';
    const UPDATED_AT = null;
    protected $cacheFields = ['id', 'news_id']; // 缓存字段，用于搜索绑定的字段

    // 定义验证操作
    public function rules()
    {

        $add = [
        ];

        $edit = [
        ];

        $info = [
        ];


        $rule = [
            'news_id'  => 'required|numeric',
            'describe' => 'required',
            'content'  => 'required',
        ];


        $msg = [
            'id'       => '自编号',
            'news_id'  => '文章ID',
            'describe' => '描述',
            'content'  => '档案详细内容',
            'ctime'    => '创建时间',
        ];

        return ['rule' => $rule, 'msg' => $msg, 'add' => $add];
    }
}
